package com.wcs.exam.controller.admin.req;

import java.io.Serializable;
import java.io.Serial;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import jakarta.validation.constraints.NotBlank;

/**
 * <p>
 * Admin-分类-保存请求参数
 * </p>
 *
 * @author wcs
 * @since 2025-03-11
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(description = "Admin-分类-保存请求参数")
public class AdminCategorySaveReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "父分类ID-和类型不能同时为空，同时存在时优先使用父分类ID")
    private Long parentId;

    @Schema(description = "类型(1:通用、2:试题、3:试卷)-和父分类ID不能同时为空，同时存在时优先使用父分类ID")
    private Integer categoryType;

    @Size(max = 50, message = "名称不能超过50个字符")
    @NotBlank(message = "名称不能为空")
    @Schema(description = "名称(内容限制：1~50)", requiredMode = Schema.RequiredMode.REQUIRED)
    private String categoryName;

    @Schema(description = "排序")
    private Integer sort;
}
